package com.wf.day_0607.test7;

import com.wf.atm.utils.IOUtils;
import java.io.IOException;

/**
 * @author mpk
 * @since 2024/6/7 16:33:30
 */
public class ObjectTest {


    public static void main(String[] args) throws IOException, ClassNotFoundException {

        Student student = Student.getInstance();
        student.setName("张三");
        student.setAge(18);
        IOUtils.writeFile(student,"A.txt");


        Student read = (Student) IOUtils.readFile("A.txt");


        System.out.println(read == student); //true
    }


}
